var mainTabcurrentIndex = 3
function choseTabbarItem(index) {
    const tabs = document.querySelectorAll('.tabMenuItem');
    const contents = document.querySelectorAll('.tabContent')
    // 排他算法：清除所有激活状态
    tabs.forEach(tab => tab.classList.remove('focurse'));
    contents.forEach(tab => tab.classList.remove('active'));

    tabs[index].classList.add("focurse")
    contents[index].classList.add("active")
}
function mainTabChange(index) {
    console.log(index)
    if (index !== mainTabcurrentIndex) {
        const tabs = document.querySelectorAll('.tabbarItem');
        const contents = document.querySelectorAll('.mainTabContent')
        // 排他算法：清除所有激活状态
        tabs.forEach(tab => tab.classList.remove('active'));
        contents.forEach(tab => tab.classList.remove('mainTabActive'));
        tabs[index].classList.add("active")
        contents[index].classList.add("mainTabActive")
        mainTabcurrentIndex=index
    }

}
function choseTabbar1Item(index) {
    const tabs = document.querySelectorAll('.tabMenuItem1');
    const contents = document.querySelectorAll('.tabContent1')
    // 排他算法：清除所有激活状态
    tabs.forEach(tab => tab.classList.remove('focurse'));
    contents.forEach(tab => tab.classList.remove('active'));

    tabs[index].classList.add("focurse")
    contents[index].classList.add("active")
}